<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"  href="/styles/general.css"/>
<link rel="stylesheet" type="text/css" href="/styles/main.css"/>
<link rel="stylesheet" type="text/css" href="/styles/validator.css"/>
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/formValidator.js" type="text/javascript"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function(){
	$.formValidator.initConfig({formid:"myform",onerror:function(msg){alert(msg)}});
	$("#servername").formValidator({onshow:"请输入主机名称",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#datacenter").formValidator({onshow:"请输入数据中心名称",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#gid").formValidator({onshow:"请输入组ID",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#notificationemail").formValidator({onshow:"请输入通知邮件",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#notificationemailfrom").formValidator({onshow:"请输入邮件发送人",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#smtpserver").formValidator({onshow:"请输入SMTP服务器",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#smtpconnecttimeout").formValidator({onshow:"请输入SMTP超时(s)",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#routerid").formValidator({onshow:"请输入路由ID",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#iinterface").formValidator({onshow:"请输入服务设备接口",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#lvssyncdaemoninteface").formValidator({onshow:"请输入探测设备接口",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#virtualrouterid").formValidator({onshow:"请输入虚拟路由ID",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#priority").formValidator({onshow:"请输入优先权",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#advertint").formValidator({onshow:"请输入同步通知间隔(s)",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#authtype").formValidator({onshow:"请输入验证类型",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#authpass").formValidator({onshow:"请输入验证密码",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
});
</script>
<title></title>
</head>
<body>
<h1>
<span class="action-span"><a href="/lvsdatacenter">管理数据中心</a></span>
<span class="action-span1"> 添加数据中心</span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
  <form action="/lvsdatacenter/add/" method="post" name="myform" id="myform" enctype="multipart/form-data">
  <table width="100%" id="table_form">
      <tr>
        <td class="label">角色：</td>
        <td>
			{form radio * state state * * * $states}
        </td>
        <td><div id='stateTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">主机名称：</td>
        <td>
			{form text * servername servername}
        </td>
        <td><div id='servernameTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">数据中心名称：</td>
        <td>
			{form text * datacenter datacenter}
        </td>
        <td><div id='datacenterTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">组ID：</td>
        <td>
			{form text * gid gid}
        </td>
        <td><div id='gidTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">服务IP：</td>
        <td>
			{form text * wip wip}
        </td>
        <td><div id='wipTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">通讯IP：</td>
        <td>
			{form text * lip lip}
        </td>
        <td><div id='lipTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">通知邮件：</td>
        <td>
			{form text * notificationemail notificationemail}
        </td>
        <td><div id='notificationemailTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">邮件发送人：</td>
        <td>
			{form text * notificationemailfrom notificationemailfrom}
        </td>
        <td><div id='notificationemailfromTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">SMTP服务器：</td>
        <td>
			{form text * smtpserver smtpserver}
        </td>
        <td><div id='smtpserverTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">SMTP超时(s)：</td>
        <td>
			{form text * smtpconnecttimeout smtpconnecttimeout}
        </td>
        <td><div id='smtpconnecttimeoutTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">路由ID：</td>
        <td>
			{form text * routerid routerid}
        </td>
        <td><div id='routeridTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">服务设备接口：</td>
        <td>
			{form text * iinterface iinterface}
        </td>
        <td><div id='iinterfaceTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">探测设备接口：</td>
        <td>
			{form text * lvssyncdaemoninteface lvssyncdaemoninteface}
        </td>
        <td><div id='lvssyncdaemonintefaceTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">虚拟路由ID：</td>
        <td>
			{form text * virtualrouterid virtualrouterid}
        </td>
        <td><div id='virtualrouteridTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">优先权：</td>
        <td>
			{form text * priority priority}
        </td>
        <td><div id='priorityTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">同步通知间隔(s)：</td>
        <td>
			{form text * advertint advertint}
        </td>
        <td><div id='advertintTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">验证类型：</td>
        <td>
			{form text * authtype authtype}
        </td>
        <td><div id='authtypeTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">验证密码：</td>
        <td>
			{form text * authpass authpass}
        </td>
        <td><div id='authpassTip' style="width:250px"></div></td>
      </tr>
  </table>  
   <div class="button-div">
        <input type="submit" value="&nbsp;确&nbsp;定&nbsp;" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="&nbsp;重&nbsp;置&nbsp;" />
   </div>
  </form>
</div>
{template 'footer.html'}
</body>
</html>
